<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // let p = Promise.reject(123);//返回失败
        // console.log(p)
        // let p1 = Promise.resolve(345);//返回成功
        // console.log(p1);
        let p = new Promise((reslove , reject)=>{
            reslove("OK")
        })
        p.then((value=>{
            console.log(value)
            // .then 可以同时写多了
            
        }))
    </script>
</body>
</html>